<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>周报</title>
    <style>
        body {
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            line-height: 1.6;
            color: #333;
            max-width: 800px;
            margin: 0 auto;
            padding: 20px;
            background: #f5f5f5;
        }
        .container {
            background: white;
            border-radius: 10px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            overflow: hidden;
        }
        .header {
            background: #2c3e50;
            color: white;
            padding: 30px;
            text-align: center;
        }
        .content {
            padding: 30px;
        }
        .metric {
            display: inline-block;
            width: 30%;
            text-align: center;
            padding: 20px;
            margin: 1%;
            background: #ecf0f1;
            border-radius: 8px;
        }
        .metric-value {
            font-size: 36px;
            font-weight: bold;
            color: #3498db;
        }
        .metric-label {
            color: #7f8c8d;
            margin-top: 10px;
        }
        table {
            width: 100%;
            border-collapse: collapse;
            margin: 20px 0;
        }
        th, td {
            padding: 12px;
            text-align: left;
            border-bottom: 1px solid #ddd;
        }
        th {
            background: #34495e;
            color: white;
        }
        tr:hover {
            background: #f5f5f5;
        }
        .footer {
            text-align: center;
            padding: 20px;
            color: #7f8c8d;
            font-size: 12px;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>{{report_title}}</h1>
            <p>{{date_range}}</p>
        </div>

        <div class="content">
            <h2>关键指标</h2>
            <div style="text-align: center;">
                <div class="metric">
                    <div class="metric-value">{{total_users}}</div>
                    <div class="metric-label">总用户数</div>
                </div>
                <div class="metric">
                    <div class="metric-value">{{new_users}}</div>
                    <div class="metric-label">新增用户</div>
                </div>
                <div class="metric">
                    <div class="metric-value">{{active_rate}}%</div>
                    <div class="metric-label">活跃率</div>
                </div>
            </div>

            <h2>详细数据</h2>
            <table>
                <thead>
                    <tr>
                        <th>日期</th>
                        <th>访问量</th>
                        <th>转化率</th>
                        <th>收入</th>
                    </tr>
                </thead>
                <tbody>
                    {{table_rows}}
                </tbody>
            </table>

            <h2>重要事项</h2>
            <ul>
                {{highlights}}
            </ul>
        </div>

        <div class="footer">
            <p>本报告由 Email Report System 自动生成</p>
            <p>生成时间: {{generate_time}}</p>
        </div>
    </div>
</body>
</html>
